package com.ude.pim.controller;

import com.ude.pim.common.R;
import com.ude.pim.dto.CaseSubDelayApplyDTO;
import com.ude.pim.dto.CaseSubFinishApplyDTO;
import com.ude.pim.entity.CaseSubFinishApply;
import com.ude.pim.service.CaseSubFinishApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yb
 * @since 2023-08-25
 */
@RestController
@RequestMapping("/caseSubFinishApply")
public class CaseSubFinishApplyController {
    @Autowired
    private CaseSubFinishApplyService caseSubFinishApplyService;

    @PostMapping("/applyFinish")
    public R<String> applyFinish(@RequestBody CaseSubFinishApply caseSubFinishApply){
        return caseSubFinishApplyService.applyFinish(caseSubFinishApply);
    }

    @GetMapping("/checkList")
    public R<List<CaseSubFinishApplyDTO>> checkList(){
        return caseSubFinishApplyService.checkList();
    }

    @PutMapping("/judgeApply")
    public R<String> judge(@RequestBody CaseSubFinishApplyDTO caseSubFinishApplyDTO){
        return caseSubFinishApplyService.judge(caseSubFinishApplyDTO);
    }
}
